<?php
class AppModel extends Model {
	
    function covertArray($records,$model,$key='id',$value='name')
    {
        $data = array();
        foreach($records as $record)
        {
            $data[$record[$model][$key]] = $record[$model][$value]; 
        }
        return $data;
    }
}
?>
